package ${ftl.packageName}.${cgH.moduleName};
<#assign en =0 />
<#assign dto =8 />
import tk.mybatis.mapper.common.Mapper;
import org.apache.ibatis.annotations.Param;
import com.stars.entity.ListPage;
import ${mList[en].packageName}.${tc.moduleName}.${tc.entityName}${mList[en].classPostfix};
import ${mList[dto].packageName}.${tc.moduleName}.${tc.entityName}${mList[dto].classPostfix};
import java.util.List;
/**
 * @Title: ${tc.tableComment} mybatis dao
 * @author dj
 * @date ${tc.createTime}
 * @version V1.0
 *
 */
public interface ${tc.entityName}${tc.entityPostfix} extends  Mapper<${tc.entityName}${mList[en].classPostfix}>{

    /**
     * 分页查询
     * @param listPage 查询参数 起始页，大小。
     * @return
     */
    List<${tc.entityName}${mList[dto].classPostfix}> pageQuery${tc.entityName}(ListPage<${tc.entityName}${mList[dto].classPostfix}> listPage) throws Exception;
<#if "${cgH.isTree =='1'}">
     /**
     *  根据条件查询
     * @param dto 查询参数
     * @return
     */
    List<${tc.entityName}${mList[dto].classPostfix}> findByTreeList(@Param("entity") ${tc.entityName}${mList[dto].classPostfix} dto)throws Exception;

    /**
    *  根据条件查询
    * @param pid 查询参数
    * @return
    */
    List<${tc.entityName}${mList[dto].classPostfix}> findByPid(@Param("pid") String pid)throws Exception;

    /**
     *  根据资源id查询子菜单
     * @param entity 查询参数
     * @return
     */
    List<${tc.entityName}${mList[dto].classPostfix}> findTreeList(@Param("list") List<${tc.entityName}${mList[dto].classPostfix}> entity)throws Exception;
</#if>
}